package com.zzw.hj11;

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;

/**
 * @Project: hw_java
 * @Description: 数字颠倒
 * @Author: zzw
 */

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        List<Integer> numList = new ArrayList<>();
        if (num == 0) {
            System.out.print(num);
        }
        while (num > 0) {
            int rem = num % 10;
            numList.add(rem);
            num = num / 10;
        }
        for (Integer i : numList) {
            System.out.print(i);
        }

    }
}